package com.project.dao.implement;

import org.apache.ibatis.session.SqlSession;

import com.project.utils.SessionFactoryGen;
import com.project.dao.AccountCurveDataMapper;
import com.project.bean.AccountCurveData;

import java.util.List;
import java.util.Map;

public class AccountCurveDataImpl implements AccountCurveDataMapper{
	@Override
	public List<AccountCurveData> GetFund(Map param)
	{
		List<AccountCurveData> result= null;
		SqlSession sqlSession = SessionFactoryGen.getSessionFactory().openSession();  
		try
		  {
			AccountCurveDataMapper mapper =  sqlSession.getMapper(AccountCurveDataMapper.class);
			  result = mapper.GetFund(param);
			 // sqlSession.commit();
		  }
		  catch(Exception e)
		  {
			  e.printStackTrace();
		  }
		  finally
		  {
			  sqlSession.close();
		  }
		return result;
	}
	
	@Override
	public List<AccountCurveData> GetCount(Map param)
	{
		List<AccountCurveData> result= null;
		SqlSession sqlSession = SessionFactoryGen.getSessionFactory().openSession();  
		try
		  {
			AccountCurveDataMapper mapper =  sqlSession.getMapper(AccountCurveDataMapper.class);
			  result = mapper.GetCount(param);
			 // sqlSession.commit();
		  }
		  catch(Exception e)
		  {
			  e.printStackTrace();
		  }
		  finally
		  {
			  sqlSession.close();
		  }
		return result;
	}
}
